import request from '@/utils/request'

// 查询荣誉列表
export function listHonor (query) {
  return request({
    url: '/archive-honor/honor/list',
    method: 'get',
    params: query
  })
}

// 查询荣誉详细
export function getHonor (honorId) {
  return request({
    url: '/archive-honor/honor/' + honorId,
    method: 'get'
  })
}

// 新增荣誉
export function addHonor (data) {
  return request({
    url: '/archive-honor/honor',
    method: 'post',
    data: data
  })
}

// 修改荣誉
export function updateHonor (data) {
  return request({
    url: '/archive-honor/honor',
    method: 'put',
    data: data
  })
}

// 删除荣誉
export function delHonor (honorId) {
  return request({
    url: '/archive-honor/honor/' + honorId,
    method: 'delete'
  })
}

// 导出荣誉
export function exportHonor (query) {
  return request({
    url: '/archive-honor/honor/export',
    method: 'get',
    params: query
  })
}

export function getHonorPictures (honorId) {
  return request({
    url: '/archive-honor/honor/export',
    method: 'get',
    params: honorId
  })
}

// 修改荣誉
export function addPicture (data) {
  return request({
    url: '/archive-honor/honor/edit-picture',
    method: 'put',
    data: data
  })
}
// 上传附件
export function addAttachment (data) {
  return request({
    url: '/archive-honor/honor/edit-attachment',
    method: 'put',
    data: data
  })
}

